﻿@{
    var registrationMode = DIContainer.Resolve<IUserSettingsManager>().Get().RegistrationMode;
}
<!DOCTYPE html>
<html>
@using (Html.BeginHead())
{
    Html.IncludeCombresScript(PageResourceType.CSS, "siteCss");
    Html.IncludeCombresScript(PageResourceType.JS, "siteJs", ResourceRenderPriority.First);
    Html.IncludeCombresScript(PageResourceType.JS, "FormJs");
    Html.IncludeCombresScript(PageResourceType.JS, "ImageJs");
    Html.IncludeCombresScript(PageResourceType.JS, "CodeHighlighterJs");
    Html.IncludeCombresScript(PageResourceType.JS, "UnobtrusiveJs", ResourceRenderPriority.Last);
}
<body class="tn-page-bg" id="@Html.GenerateBodyId()">
    <div class="tn-doc-bg" id="tn-doc">
        <div id="tn-header" class="tn-header-bg">
            <div class="tn-wrapper">
                <p class="tn-helper-right">
                </p>
                <h1>爱驿站</h1>
                @if (Request.IsAuthenticated)
                {
                    <a href="#" title="消息" name="messagePrompt"  data_menu_clicktrigger="true" menu="#messagePrompt" class="tn-icon tn-icon-email" url='@Url.Action("_ListPrompt", "MessageCenter")'></a>

                    <div id="messagePrompt" style="display: none" class="tn-widget tn-bubble tn-bubble-arrow-top tnc-prompt">
                    </div>
                    <text>欢迎使用 <b>@Context.User.Identity.Name</b>!
                    @Html.Link("注销", SiteUrls.Instance().Logout(), "注销")
                    </text>
                }
                else
                {

                    @Html.Link("登录", SiteUrls.Instance().Login(false, SiteUrls.LoginModal._LoginInModal), "登录", new { id = "dialog2", plugin = "dialog" })
                    if (registrationMode == RegistrationMode.All)
                    { 
                    <li>@Html.Link("注册", SiteUrls.Instance().Register(), "注册")</li>
                    }
                }
                <span id="unreadCount" style="text-align: right"></span>
                <div class="tn-nav">
                </div>
            </div>
        </div>
        <div class="tn-content-bg" id="tn-content">
            <div class="tn-wrapper">
                @RenderBody()
            </div>
        </div>
        <div class="tn-footer-bg" id="tn-footer">
            <div class="tn-wrapper">
                <p>
                    Powered by Spacebuilder v4.0 ©2005-2013 Tunynet Inc.
                </p>
            </div>
        </div>
    </div>
</body>
</html>
